home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / t_unix / j109lxa4.tar / trace.h < prev    next >
C/C++ Source or Header  |  1994-06-04  |  4KB  |  151 lines

  1. #ifndef    _TRACE_H
  2. #define    _TRACE_H
  3.  
  4. #ifndef    _MBUF_H
  5. #include "mbuf.h"
  6. #endif
  7.  
  8. #ifndef    _IFACE_H
  9. #include "iface.h"
  10. #endif
  11.  
  12. /* Definitions for packet dumping */
  13.  
  14. /* Table of trace subcommands */
  15. struct tracecmd {
  16.     char *name;    /* Name of trace subcommand */
  17.     int val;    /* New setting for these bits */
  18.     int mask;    /* Mask of bits affected in trace word */
  19. };
  20. extern struct tracecmd Tracecmd[];    /* Defined in trace.c */
  21.  
  22. /* List of address testing and tracing functions for each interface.
  23.  * Entries are placed in this table by conditional compilation in main.c.
  24.  */
  25. struct trace {
  26.     int (*addrtest) __ARGS((struct iface *ifp,struct mbuf *bp));
  27. #ifdef MONITOR
  28.     void (*tracef) __ARGS((FILE *,struct mbuf **,int,int));
  29. #else
  30.     void (*tracef) __ARGS((FILE *,struct mbuf **,int));
  31. #endif
  32. };
  33.  
  34. extern struct trace Tracef[];
  35.  
  36. /* In trace.c: */
  37. void dump __ARGS((struct iface *ifp,int direction,unsigned type,struct mbuf *bp));
  38. void raw_dump __ARGS((struct iface *ifp,int direction, struct mbuf *bp));
  39. void trace_log __ARGS((struct iface *ifp,char *fmt, ...));
  40. void shuttrace __ARGS ((void));
  41.  
  42. /* In arcdump.c: */
  43. #ifdef MONITOR
  44. void arc_dump __ARGS((FILE *fp,struct mbuf **bpp,int check,int mon));
  45. #else
  46. void arc_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  47. #endif
  48. int arc_forus __ARGS((struct iface *iface,struct mbuf *bp));
  49.  
  50. /* In arpdump.c: */
  51. #ifdef MONITOR
  52. void arp_dump __ARGS((FILE *fp,struct mbuf **bpp,int mon));
  53. #else
  54. void arp_dump __ARGS((FILE *fp,struct mbuf **bpp));
  55. #endif
  56.  
  57. /* In ax25dump.c: */
  58. #ifdef MONITOR
  59. void ax25_dump __ARGS((FILE *fp,struct mbuf **bpp,int check,int mon));
  60. #else
  61. void ax25_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  62. #endif
  63. int ax_forus __ARGS((struct iface *iface,struct mbuf *bp));
  64.  
  65. /* In enetdump.c: */
  66. #ifdef MONITOR
  67. void ether_dump __ARGS((FILE *fp,struct mbuf **bpp,int check,int mon));
  68. #else
  69. void ether_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  70. #endif
  71. int ether_forus __ARGS((struct iface *iface,struct mbuf *bp));
  72.  
  73. /* In icmpdump.c: */
  74. #ifdef MONITOR
  75. void icmp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check,int mon));
  76. #else
  77. void icmp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check));
  78. #endif
  79.  
  80. /* In ipdump.c: */
  81. #ifdef MONITOR
  82. void ip_dump __ARGS((FILE *fp,struct mbuf **bpp,int check,int mon));
  83. #else
  84. void ip_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  85. #endif
  86.  
  87. /* In kissdump.c: */
  88. #ifdef MONITOR
  89. void ki_dump __ARGS((FILE *fp,struct mbuf **bpp,int check,int mon));
  90. #else
  91. void ki_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  92. #endif
  93. int ki_forus __ARGS((struct iface *iface,struct mbuf *bp));
  94.  
  95. /* In nrdump.c: */
  96. #ifdef MONITOR
  97. void netrom_dump __ARGS((FILE *fp,struct mbuf **bpp,int check,int mon));
  98. #else
  99. void netrom_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  100. #endif
  101.  
  102. /* In pppdump.c: */
  103. #ifdef MONITOR
  104. void ppp_dump __ARGS((FILE *fp,struct mbuf **bpp,int check,int mon));
  105. #else
  106. void ppp_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  107. #endif
  108.  
  109. /* In ripdump.c: */
  110. #ifdef MONITOR
  111. void rip_dump __ARGS((FILE *fp,struct mbuf **bpp,int mon));
  112. #else
  113. void rip_dump __ARGS((FILE *fp,struct mbuf **bpp));
  114. #endif
  115.  
  116. /* In ripdump.c: */
  117. #ifdef MONITOR
  118. void rspf_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check,int mon));
  119. #else
  120. void rspf_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check));
  121. #endif
  122.  
  123. /* In slcompdump.c: */
  124. #ifdef MONITOR
  125. void sl_dump __ARGS((FILE *fp,struct mbuf **bpp,int check,int mon));
  126. void vjcomp_dump __ARGS((FILE *fp,struct mbuf **bpp,int unused,int mon));
  127. #else
  128. void sl_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  129. void vjcomp_dump __ARGS((FILE *fp,struct mbuf **bpp,int unused));
  130. #endif
  131.  
  132. /* In tcpdump.c: */
  133. #ifdef MONITOR
  134. void tcp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check,int mon));
  135. #else
  136. void tcp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check));
  137. #endif
  138.  
  139. /* In udpdump.c: */
  140. #ifdef MONITOR
  141. void udp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check,int mon));
  142. #else
  143. void udp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check));
  144. #endif
  145.  
  146. #ifdef UNIX
  147. #define fprintf traceprintf
  148. #endif
  149.  
  150. #endif    /* _TRACE_H */
  151.